package com.heima.test01;

import java.util.ArrayList;

public class ProductTest {
    public static void main(String[] args) {
        ArrayList<Product> list = new ArrayList<>();
        Product mop = new Product("拖把", 20, 2);
        list.add(mop);
        for (int i = 0; i < list.size(); i++) {
            Product p = list.get(i);
            System.out.println(p.getName()+p.sumPrice());
        }
    }
}
